function [Yes]=checksign(irf,start,ende,sign)
%the function checks whether irf has the correct sign btw periods start and
%end, sign is one for larger or equal to zero and minus 1 for negative or
%zero.
%irf=squeeze(irf);
checkpl=irf(1,1,start:ende)>=0;
checkmin=irf(1,1,start:ende)<=0; 
Yes=0;
if sign=='+'
    if (min(checkpl(1,1,:))==1)
Yes=1;
    elseif(min(checkmin(1,1,:))==1)
Yes=-1;
    end
elseif sign=='-'
    if (min(checkpl(1,1,:))==1)
Yes=-1;
    elseif(min(checkmin(1,1,:))==1)
Yes=1;
    end
end
